home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
cat1
/
wish.1
< prev
Wrap
Text File
|
1994-09-20
|
5KB
|
199 lines
wish(1) Tk Applications 3.3
_________________________________________________________________
NAME
wish - Simple windowing shell
SYNOPSIS
wish ?_o_p_t_i_o_n_s? ?_a_r_g _a_r_g ...?
OPTIONS
-display _d_i_s_p_l_a_y
Display (and screen) on which to display win-
dow.
-file _f_i_l_e_N_a_m_e Read commands from _f_i_l_e_N_a_m_e rather than stan-
dard input. The last element in _f_i_l_e_N_a_m_e
will be used as the title for the application
and name of its interpreter for send commands
(unless overridden by the -name option).
-geometry _g_e_o_m_e_t_r_y
Initial geometry to use for window.
-name _n_a_m_e Use _n_a_m_e as the title to be displayed in the
window, and as the name of the interpreter
for send commands.
-sync Execute all X server commands synchronously,
so that errors are reported immediately.
This will result in much slower execution,
but it is useful for debugging.
-help Print a summary of the command-line options
and exit.
_________________________________________________________________
DESCRIPTION
Wish is a simple program consisting of the Tcl command
language, the Tk toolkit, and a main program that reads com-
mands from standard input or from a file. It creates a main
window and then processes Tcl commands. If wish is invoked
with no -f option then it reads Tcl commands interactively
from standard input. It will continue processing commands
until all windows have been deleted or until end-of-file is
reached on standard input. If there exists a file .wishrc |
in the home directory of the user, wish evaluates the file |
as a Tcl script just before reading the first command from |
standard input.
If the -file option is provided to Tk, then wish reads Tcl
commands from the file named in the -file option. These
commands will normally create an interactive interface
Tk 1
wish(1) Tk Applications 3.3
consisting of one or more widgets. When the end of the com-
mand file is reached, wish will continue to respond to X
events until all windows have been deleted. There is no |
automatic evaluation of .wishrc in this case, but the script |
file can always source it if desired.
VARIABLES
Wish sets the following Tcl variables:
argc Contains a count of the number of _a_r_g argu-
ments (0 if none), not including the options
described above.
argv Contains a Tcl list whose elements are the
_a_r_g arguments (not including the options
described above), in order, or an empty
string if there are no _a_r_g arguments.
argv0 Contains _f_i_l_e_N_a_m_e if it was specified. Oth- |
erwise, contains the name by which wish was |
invoked. |
tcl_interactive ||
Contains 1 if wish is reading commands |
interactively (no -file option was specified |
and standard input is a terminal-like dev- |
ice), 0 otherwise.
SCRIPT FILES
If you create a Tcl script in a file whose first line is
#!/usr/local/bin/wish -f
then you can invoke the script file directly from your shell
if you mark it as executable. This assumes that wish has
been installed in the default location in /usr/local/bin;
if it's installed somewhere else then you'll have to modify
the above line to match.
PROMPTS
When wish is invoked interactively it normally prompts for |
each command with ``% ''. You can change the prompt by set- |
ting the variables tcl_prompt1 and tcl_prompt2. If variable |
tcl_prompt1 exists then it must consist of a Tcl script to |
output a prompt; instead of outputting a prompt wish will |
evaluate the script in tcl_prompt1. The variable |
tcl_prompt2 is used in a similar way when a newline is typed |
but the current command isn't yet complete; if tcl_prompt2 |
isn't set then no prompt is output for incomplete commands.
Tk 2
wish(1) Tk Applications 3.3
KEYWORDS
shell, toolkit
Tk 3